package com.bank.common.resultUtil;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    PARAM_ERROR( 202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    DATA_UPDATE_ERROR(205, "数据版本异常"),

    USER_NONEXIST(210,"用户不存在"),

    USER_EXIST(211,"用户已存在"),
    PASSWORD_WRONG(212,"密码错误"),


    FILE_FAILED(216,"文件存储失败"),
    FILE_NAME_FORMAT_FAILED(217,"文件名称异常"),
    FILE_INFO_EXIST(218,"数据库中已存在该文件"),
    FILE_INFO_FAILED(219,"文件基本信息存储失败"),
    FILE_FORMAT_ERROR(220,"文件格式错误"),

    ROLE_FAILED(221,"身份异常"),
    ROLE_NONEXIST(222,"不存在该角色"),
    ROLE_INSUFFICIENT_PERMISSIONS(223,"权限不足"),

    HW_STORE_FAILED(226,"作业存储失败"),
    HW_EXIST(227,"作业已提交过"),

    FILECON_FAILED(231,"文件关联元组存储失败"),

    COOKIE_NONEXIST(236,"cookie不存在"),

    DATA_NULL(241,"值为空"),

    LOGIN_OUT(250,"退出登录成功"),

    LOGIN_OVERDUE(400,"登录过期,重新登录"),
    LOGIN_NOT(401,"未登录"),
    LOGIN_SUCCESS(402,"登录成功"),

    DATABASE_WRONG(501,"数据库执行错误"),

    SUBJECT_STORE_FAIL(505,"subject存储失败")


    ;

    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}

